package org.jnativehook;

public class NativeSystem
{
  public static Family getFamily()
  {
    String str = System.getProperty("os.name");
    Family localFamily;
    if (str.toLowerCase().startsWith("windows"))
      localFamily = Family.WINDOWS;
    else if (str.toLowerCase().equals("linux"))
      localFamily = Family.LINUX;
    else if (str.toLowerCase().equals("freebsd"))
      localFamily = Family.FREEBSD;
    else if (str.toLowerCase().equals("mac os x"))
      localFamily = Family.OSX;
    else
      localFamily = Family.UNSUPPORTED;
    return localFamily;
  }

  public static Arch getArchitecture()
  {
    String str = System.getProperty("os.arch");
    Arch localArch;
    if ((str.equalsIgnoreCase("x86")) || (str.equalsIgnoreCase("i386")) || (str.equalsIgnoreCase("i486")) || (str.equalsIgnoreCase("i586")) || (str.equalsIgnoreCase("i686")))
      localArch = Arch.x86;
    else if ((str.equalsIgnoreCase("x86_64")) || (str.equalsIgnoreCase("amd64")) || (str.equalsIgnoreCase("k8")))
      localArch = Arch.x86_64;
    else if ((str.equalsIgnoreCase("ppc")) || (str.equalsIgnoreCase("PowerPC")))
      localArch = Arch.PPC;
    else if (str.equalsIgnoreCase("ppc64"))
      localArch = Arch.PPC64;
    else
      localArch = Arch.UNSUPPORTED;
    return localArch;
  }

  public static enum Arch
  {
    x86, x86_64, PPC, PPC64, ARM, MIPS, SPARC, ALPHA, UNSUPPORTED;
  }

  public static enum Family
  {
    WINDOWS, LINUX, FREEBSD, OPENBSD, OSX, UNSUPPORTED;
  }
}

/* Location:           D:\Downloads\JNativeHook\jar\JNativeHook.jar
 * Qualified Name:     org.jnativehook.NativeSystem
 * JD-Core Version:    0.6.0
 */